package gh.library.baseapp;

import android.content.Context;

import androidx.multidex.MultiDex;
import androidx.multidex.MultiDexApplication;

import com.licheedev.adaptscreen.AdaptScreenEx;

import gh.library.utils.LogUtils;

public class GhApp extends MultiDexApplication {
//    设计图短边为1080像素
    private static int designShortSize=378;
    private static int screenType=1;
    private static GhApp baseApplication;
    public static int getScreenType() {
        return screenType;
    }

    public static int getDesignShortSize(){
        return designShortSize;
    }
    public static void setDesignShortSize(int designShort){
        designShortSize=designShort;
    }
    @Override
    public void onCreate() {
        super.onCreate();
        baseApplication=this;
        //手机适配
        AdaptScreenEx.init(this);
        LogUtils.logInit(true);//日志
    }

    public static Context getAppContext() {
        return baseApplication;
    }
    /**
     * 分包
     * @param base
     */
    @Override
    protected void attachBaseContext(Context base) {
        MultiDex.install(this);
        super.attachBaseContext(base);

    }
}
